package com.train.pay.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = {"/pay"})
public class PayController {
    @Value("${server.port}")
    private Integer port;
    @RequestMapping(method = {RequestMethod.GET})
    public String pay(){
        return "pay-server:"+port;
    }
    @RequestMapping(value = "sentinel",method = {RequestMethod.GET})
    public String sentinel(){
        return "sentinel invoke pay-server:"+port;
    }

}
